<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -->
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich">
      <f:loadBundle basename="oo.messages" var="msgs"/>
      <f:loadBundle basename="zsm.opisy" var="zsm"/>
  <body>
<!-- <ui:include src="/zsm/template/comboBox_wojewodztwa.xhtml" /> -->
<f:view >
<h:form>
<!-- ok -->
<rich:panel >
	<center>
    <a4j:commandButton action="starszenowe1" id="dodajogloszenie1"  value="#{msgs.czolozakladkadodajogl}" title="dodaj" >
    <!-- <a4j:commandButton action="#{nawigacja.nawiguj}" id="dodajogloszenie1"  value="#{msgs.czolozakladkadodajogl}" title="dodaj" > -->
    <a4j:actionparam name="username" value="1" assignTo="#{dodawanie.nazwa}"/>
	   	<!-- <a4j:actionparam name="username" value="1" assignTo="#{nawigacja.username}"/> -->
    </a4j:commandButton>
	</center><br/>
	<!-- wyszukiwarka -->
	<!--<ui:include src="/zsm/template/wyszukiwarka.xhtml" />
	 --><h:panelGrid  columns="2" id="editGrid_">
				<f:facet name="header">Wyszukaj wg:</f:facet>
                <h:outputText value="Wojewodztwo :" id="og_1"/>
                <rich:comboBox selectFirstOnUpdate="false" defaultLabel="Wybierz wojewodztwo">
        			<!-- <f:selectItems value="#{dodawanie.wojewodztwa.listaWojewodztw}" /> -->
    			</rich:comboBox>
    			
                <h:outputText value="Miasto :" id="og_2"/>
                <rich:comboBox selectFirstOnUpdate="false" defaultLabel="Wybierz miasto">
        			<!-- <f:selectItems value="#{dodawanie.lista}" /> -->
    			</rich:comboBox>
    			
	</h:panelGrid><br/> 
        <f:facet name="header"><h:outputText value="#{msgs.czolozakladka1}"/></f:facet>
         <rich:dataTable height="180px" width="300px" value="#{TaskListBean.dataList}"
         id="ogloszenia_starsze"
         var="dataItem" 
         rows="5" >
		         <a4j:support event="onRowClick" reRender="og_1_,og_2_,og_3_">
        	        <f:setPropertyActionListener target="#{TaskListBean.ogloszeniepodglad}" value="#{dataItem}" />
        		 </a4j:support>
                 <rich:column>
                 <f:facet name="header">
                        <h:outputText value="#{msgs.ak}" />
                    </f:facet>
                 	<!-- <a4j:commandLink action="#{TaskListBean.akcja1}" value="#{dataItem.tresc}">
                 		<f:setPropertyActionListener target="#{TaskListBean.idogloszenia}" value="#{dataItem.id}" />
                 		<rich:componentControl for="szczegolyogloszenia" operation="show" event="onclick" />
                 	</a4j:commandLink> -->
                 	<div style="float:right;">
                 	<i>
                 	<h:outputText value="#{dataItem.dataDodania}">
					  <f:convertDateTime dateStyle="short" timeZone="EST" type="date" />
					</h:outputText><!-- #{dataItem.dataDodania} --></i></div>
                </rich:column>
                <f:facet name="footer">
                    <rich:datascroller  for="ogloszenia_starsze" renderIfSinglePage="true" maxPages="3">
                    <f:facet name="first"><h:outputText value="#{msgs.tabelaogloszeniaaktualnelabelapierwsza}"/></f:facet>
          			<f:facet name="last"><h:outputText value="#{msgs.tabelaogloszeniaaktualnelabelaostatnia}"/></f:facet>  
                    </rich:datascroller>
                </f:facet>
            </rich:dataTable>
<!-- </rich:panel> -->
<!-- </h:form> -->
<!-- </f:view> -->
<!-- <ui:include src="/zsm/modalpanels/szczegolyogloszenia_1.xhtml" /> -->

<!-- <rich:modalPanel header="Szczegóły ogłoszenia" id="dodawaniepanel"  width="400" height="170">
            <f:facet name="header">
				<h:outputText value="#{zsm.somodalpanel}"/>
		    </f:facet>
		    <b>Treść :</b>
		    <rich:panel>
		    <h:outputText value="w" id="og_1"/>
		    </rich:panel>
		    <br/>
		    <b>Kontakt :</b>
		    <rich:panel>
		    <h:outputText value="aa" id="og_2"/>
		    </rich:panel>
            <h:panelGrid columns="2" id="editGrid_">
                <h:outputText value="#{TaskListBean.ogloszeniepodglad.tresc}" id="og_1"/>
                <h:panelGroup />
                <h:outputText value="#{TaskListBean.ogloszeniepodglad.telefon}" id="og_2"/>
                <h:panelGroup />
                <h:outputText value="#{TaskListBean.ogloszeniepodglad.id}" id="og_3"/>
                <h:inputText value="#{carsBean.editedCar.price}" required="true"
                    requiredMessage="Price is required" id="price"
                    converterMessage="Should be a valid price"
                    validatorMessage="Should be a valid price" label="Price field">
                    <f:validateDoubleRange/>
                </h:inputText>
                <rich:message id="priceMsg" for="price" />
                <h:outputText value="Mileage" />
                <h:inputText value="#{carsBean.editedCar.mileage}" id="mage"
                    converterMessage="Should be a valid mileage"
                    validatorMessage="Should be a valid mileage" label="Mileage field" >
                    <f:validateDoubleRange/>
                </h:inputText>
                <h:outputText value="VIN" />
                <h:inputText value="#{carsBean.editedCar.vin}" id="vin"
                    required="true" validatorMessage="Not a valid 17-digit VIN"
                    converterMessage="Not a valid 17-digit VIN"
                    requiredMessage="VIN is required">
                    <f:validateLength minimum="17" maximum="17" />
                </h:inputText>
                <rich:message id="vinMsg" for="vin" />
            </h:panelGrid>
            <a4j:commandButton value="Zamknij"
                onclick="#{rich:component('editPane')}.hide(); return false;" />
            <center>
            <a4j:commandLink onclick="#{rich:component('dodawaniepanel')}.hide(); return false;" value="Zamknij okno"/>
            </center>
    </rich:modalPanel>
<rich:modalPanel header="Edit Car Details" id="editPane" domElementAttachment="parent" width="400" height="170">
<rich:modalPanel header="Szczegóły ogłoszenia" id="szczegolyogloszenia"  width="400" height="170">
            <f:facet name="header">
				<h:outputText value="#{zsm.somodalpanel}"/>
		    </f:facet>
		    <b>Treść :</b>
		    <rich:panel>
		    <h:outputText value="#{TaskListBean.ogloszeniepodglad.tresc}" id="og_1_"/>
		    </rich:panel>
		    <br/>
		    <b>Kontakt :</b>
		    <rich:panel>
		    <h:outputText value="#{TaskListBean.ogloszeniepodglad.telefon}" id="og_2_"/>
		    </rich:panel>
            <h:panelGrid columns="2" id="editGrid">
                <h:outputText value="#{TaskListBean.ogloszeniepodglad.tresc}" id="og_1"/>
                <h:panelGroup />
                <h:outputText value="#{TaskListBean.ogloszeniepodglad.telefon}" id="og_2"/>
                <h:panelGroup />
                <h:outputText value="#{TaskListBean.ogloszeniepodglad.id}" id="og_3"/>
                <h:inputText value="#{carsBean.editedCar.price}" required="true"
                    requiredMessage="Price is required" id="price"
                    converterMessage="Should be a valid price"
                    validatorMessage="Should be a valid price" label="Price field">
                    <f:validateDoubleRange/>
                </h:inputText>
                <rich:message id="priceMsg" for="price" />
                <h:outputText value="Mileage" />
                <h:inputText value="#{carsBean.editedCar.mileage}" id="mage"
                    converterMessage="Should be a valid mileage"
                    validatorMessage="Should be a valid mileage" label="Mileage field" >
                    <f:validateDoubleRange/>
                </h:inputText>
                <h:outputText value="VIN" />
                <h:inputText value="#{carsBean.editedCar.vin}" id="vin"
                    required="true" validatorMessage="Not a valid 17-digit VIN"
                    converterMessage="Not a valid 17-digit VIN"
                    requiredMessage="VIN is required">
                    <f:validateLength minimum="17" maximum="17" />
                </h:inputText>
                <rich:message id="vinMsg" for="vin" />
            </h:panelGrid>
            <a4j:commandButton value="Zamknij"
                onclick="#{rich:component('editPane')}.hide(); return false;" />
            <center>
            <a4j:commandLink onclick="#{rich:component('szczegolyogloszenia')}.hide(); return false;" value="Zamknij okno"/>
            </center>
    </rich:modalPanel>
<rich:modalPanel id="noweogloszenie"  width="600" height="280" >
        <f:facet name="controls">
             <h:panelGroup>
            	<h:commandButton   id="hidelink" value="#{mb.zo}"/>
                <rich:componentControl for="noweogloszenie" attachTo="hidelink" operation="hide" event="onclick"/>
             </h:panelGroup>
        </f:facet><br/><br/><br/>
		<rich:panel>
        <f:facet name="header">
        	<h:outputText value="Zgłoszenie udziału w opiece #{zgloszenie.koncowkaopisu}"/>
        </f:facet>
        <br/><br/><br/>
        <h:panelGrid width="400" columns="3" >
        <a4j:form>
        	<h:form>
        	<h:outputText value="#{TaskListBean.idogloszenia}" />
        	<h:outputText value="#{TaskListBean.ogloszeniepodglad.telefon}" /><br/>
        	<h:outputText value="#{TaskListBean.ogloszeniepodglad.tresc}" /><br/>
			<h:outputText value="Podaj treść ogłoszenia" /><h:inputText value="#{dodawanie.tresc}" title="tu wprowadź treść ogłoszenia"/><h:outputText value="#{dodawanie.validatortresc}" />
			<h:outputText value="telefon / email" /><h:inputText value="#{dodawanie.telefon}" title="uu"/><br/><h:outputText value="#{dodawanie.validatortelefon}" />
			<h:commandButton   action="#{dodawanie.dodaj_}"  value="#{mb.opisprzyciskdodaj}" id="dodaj_" title="dodaj" /><br/>
			<h:commandButton   value="#{mb.paneldodawaniaogloszenia1linkzlecajacy}" id="ioz" title="info o zlecającym" />
				<rich:componentControl for="infozlecajacy" attachTo="ioz" operation="show" event="onclick"/>
			<h:commandButton   id="hidelink" value="#{mb.zo}"/>
                <rich:componentControl for="noweogloszenie" attachTo="hidelink" operation="hide" event="onclick"/>
                <a4j:commandLink  value="Zamknij" reRender="noweogloszenie">
                 	<rich:componentControl for="noweogloszenie" operation="hide" event="onclick" />
                 </a4j:commandLink>
                 <a4j:commandButton value="Zamknij"
                onclick="#{rich:component('editPane')}.hide(); return false;" />
            </h:form>
            </a4j:form>
			</h:panelGrid> 
    	</rich:panel>
    </rich:modalPanel>
    <rich:modalPanel id="infozlecajacy"  width="600" height="100" >
             <center>
            	<h:commandButton   id="hidelink1" value="#{mb.zo}"/>
                <rich:componentControl for="infozlecajacy" attachTo="hidelink1" operation="hide" event="onclick"/>
             </center>
    </rich:modalPanel> -->
</rich:panel>
</h:form>
</f:view>
</body>
</html>


